/*
 * XML Type:  PositionOption
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PositionOption
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PositionOption(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PositionOptionImpl extends net.ofx.types.x2003.x04.impl.AbstractPositionBaseImpl implements net.ofx.types.x2003.x04.PositionOption
{
    
    public PositionOptionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SECURED$0 = 
        new javax.xml.namespace.QName("", "SECURED");
    
    
    /**
     * Gets the "SECURED" element
     */
    public net.ofx.types.x2003.x04.SecuredEnum.Enum getSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SECURED$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SecuredEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SECURED" element
     */
    public net.ofx.types.x2003.x04.SecuredEnum xgetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecuredEnum target = null;
            target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().find_element_user(SECURED$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "SECURED" element
     */
    public boolean isSetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SECURED$0) != 0;
        }
    }
    
    /**
     * Sets the "SECURED" element
     */
    public void setSECURED(net.ofx.types.x2003.x04.SecuredEnum.Enum secured)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SECURED$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SECURED$0);
            }
            target.setEnumValue(secured);
        }
    }
    
    /**
     * Sets (as xml) the "SECURED" element
     */
    public void xsetSECURED(net.ofx.types.x2003.x04.SecuredEnum secured)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecuredEnum target = null;
            target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().find_element_user(SECURED$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SecuredEnum)get_store().add_element_user(SECURED$0);
            }
            target.set(secured);
        }
    }
    
    /**
     * Unsets the "SECURED" element
     */
    public void unsetSECURED()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SECURED$0, 0);
        }
    }
}
